package com.ruoyi.erp.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.erp.mapper.PayablePlanMapper;
import com.ruoyi.erp.domain.PayablePlan;
import com.ruoyi.erp.service.IPayablePlanService;
import com.ruoyi.common.core.text.Convert;

/**
 * 付款计划Service业务层处理
 * 
 * @author sauger
 * @date 2022-04-04
 */
@Service
public class PayablePlanServiceImpl implements IPayablePlanService 
{
    @Autowired
    private PayablePlanMapper payablePlanMapper;

    /**
     * 查询付款计划
     * 
     * @param id 付款计划主键
     * @return 付款计划
     */
    @Override
    public PayablePlan selectPayablePlanById(Integer id)
    {
        return payablePlanMapper.selectPayablePlanById(id);
    }

    /**
     * 查询付款计划列表
     * 
     * @param payablePlan 付款计划
     * @return 付款计划
     */
    @Override
    public List<PayablePlan> selectPayablePlanList(PayablePlan payablePlan)
    {
        return payablePlanMapper.selectPayablePlanList(payablePlan);
    }

    /**
     * 新增付款计划
     * 
     * @param payablePlan 付款计划
     * @return 结果
     */
    @Override
    public int insertPayablePlan(PayablePlan payablePlan)
    {
        return payablePlanMapper.insertPayablePlan(payablePlan);
    }

    /**
     * 修改付款计划
     * 
     * @param payablePlan 付款计划
     * @return 结果
     */
    @Override
    public int updatePayablePlan(PayablePlan payablePlan)
    {
        return payablePlanMapper.updatePayablePlan(payablePlan);
    }

    /**
     * 批量删除付款计划
     * 
     * @param ids 需要删除的付款计划主键
     * @return 结果
     */
    @Override
    public int deletePayablePlanByIds(String ids)
    {
        return payablePlanMapper.deletePayablePlanByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除付款计划信息
     * 
     * @param id 付款计划主键
     * @return 结果
     */
    @Override
    public int deletePayablePlanById(Integer id)
    {
        return payablePlanMapper.deletePayablePlanById(id);
    }
}
